Importing data
Here we import our data and make some summary plots.
EEG Data
Importing the primary EEG data set. This is odd-harmonic filtered data from region-of-interest consisting of six electrodes over occipital cortex.
## Observations: 400
## Variables: 3
## $ wg <chr> "P2", "PM", "PG", "CM", "PMM", "PMG", "PGG", "CMM", "P4"…
## $ subject <chr> "s01", "s01", "s01", "s01", "s01", "s01", "s01", "s01", …
## $ rms <dbl> 0.4013, 0.6555, 0.5547, 0.7635, 0.9185, 0.7285, 0.4320, …
It’s clearly skewed, and negative display duration are impossible, so will fit a glm with family = 'lognormal'.

## # A tibble: 16 x 4
## wg mean_log_rms sd_log_rms median_log_rms
## <chr> <dbl> <dbl> <dbl>
## 1 CM -0.496 0.408 -0.530
## 2 CMM -0.133 0.368 -0.229
## 3 P2 -0.957 0.400 -0.917
## 4 P3 -0.828 0.473 -0.767
## 5 P31M -0.444 0.429 -0.337
## 6 P3M1 -0.149 0.431 -0.186
## 7 P4 -0.492 0.388 -0.481
## 8 P4G -0.265 0.466 -0.156
## 9 P4M 0.143 0.413 0.135
## 10 P6 -0.492 0.504 -0.349
## 11 P6M -0.0547 0.486 -0.0786
## 12 PG -0.941 0.422 -0.965
## 13 PGG -0.735 0.406 -0.777
## 14 PM -0.602 0.385 -0.635
## 15 PMG -0.268 0.420 -0.317
## 16 PMM -0.0779 0.387 -0.0486
Threshold Data
Here we import that data and select the columns that we’re interested in. Threshold gives the required display duration (in seconds) for the two stimuli to allow for accurate discrimination.
## Observations: 186
## Variables: 3
## $ subject <chr> "person10", "person10", "person10", "person10", "perso…
## $ wg <chr> "CM", "CMM", "P2", "P3", "P31M", "P3M1", "P4", "P4G", …
## $ threshold <dbl> 0.74125, 0.20216, 0.47697, 0.35012, 0.24529, 0.19022, …
As above, a summary of the data.
Again, we have a skewed distribution, so will fit with family = 'lognormal'.
Control Data
In addition to the primary EEG data set, we are also importing two control data sets which are (a) even harmonic data from the same occipital electrodes, and (b) odd harmonic data from six parietal electrodes (see Figure 1.1 and the main paper).
Types of Symmetry
<A short note on what is counted…i.e., so the reader understands that P2 has one rotation of order 2, etc>
Table 1.1: wallpaper group summary
|
group
|
rotation
|
reflection
|
glide
|
|
P2
|
2
|
0
|
0
|
|
PM
|
0
|
1
|
0
|
|
PG
|
0
|
0
|
1
|
|
CM
|
0
|
1
|
1
|
|
PMM
|
2
|
2
|
0
|
|
PMG
|
2
|
1
|
1
|
|
PGG
|
2
|
0
|
2
|
|
CMM
|
2
|
2
|
2
|
|
P4
|
4
|
0
|
0
|
|
P4M
|
4
|
4
|
2
|
|
P4G
|
4
|
2
|
4
|
|
P3
|
3
|
0
|
0
|
|
P3M1
|
3
|
3
|
3
|
|
P31M
|
3
|
3
|
3
|
|
P6
|
6
|
0
|
0
|
|
P6M
|
6
|
6
|
6
|
Subgroup Relationships
Import subgroup information and display a table of the relationships that we will be investigating.
Table 1.2: Summary of subgroup relationships. The numbers indicate the index of the subgroup, while italics indicate normal subgroups. Relationships written in yellow text are not included in our analysis.
|
subgroup
|
P2
|
PG
|
PM
|
CM
|
PGG
|
PMG
|
PMM
|
CMM
|
P4
|
P4G
|
P4M
|
P3
|
P3M1
|
P31M
|
P6
|
P6M
|
|
P2
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
PG
|
-
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
PM
|
-
|
2
|
2
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
CM
|
-
|
2
|
2
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
PGG
|
2
|
2
|
-
|
-
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
PMG
|
2
|
2
|
2
|
4
|
2
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
PMM
|
2
|
4
|
2
|
4
|
4
|
2
|
2
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
CMM
|
2
|
4
|
4
|
2
|
2
|
2
|
2
|
4
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
P4
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
2
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
|
P4G
|
4
|
4
|
8
|
4
|
2
|
4
|
4
|
2
|
2
|
9
|
-
|
-
|
-
|
-
|
-
|
-
|
|
P4M
|
4
|
8
|
4
|
4
|
4
|
4
|
2
|
2
|
2
|
2
|
2
|
-
|
-
|
-
|
-
|
-
|
|
P3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
3
|
-
|
-
|
-
|
-
|
|
P3M1
|
-
|
6
|
6
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
2
|
4
|
3
|
-
|
-
|
|
P31M
|
-
|
6
|
6
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
2
|
3
|
4
|
-
|
-
|
|
P6
|
3
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
2
|
-
|
-
|
4
|
-
|
|
P6M
|
6
|
12
|
12
|
6
|
6
|
6
|
6
|
3
|
-
|
-
|
-
|
4
|
2
|
2
|
2
|
3
|
We will remove identity relationships (i.e., a group is a subgroup of itself) and the three pairs of wallpapers groups that it subgroups of each other (e.g., PM is a subgroup of CM, and CM is a subgroup of PM). This leaves us with a total of 63 subgroups to include in our analysis.
Subgroup Comparisons
We will now compute the difference between sub- and super-groups.
Primary EEG Data
Finally, we calculate the probability that the RMS difference between subgroup and supergroup is larger than zero given the data. This information is then binned so we can colour in the posterior density plots.
Now we will use it!
Psychophysical Data
We can do the same for the display duration thresholds from our psychophysics experiment. Here we are looking for the opposite effect, namely that display larger are larger for subgroups than for supergroups (see main paper), so we calculate the probability that differences in duration are smaller than zero.
Control EEG Data
We will now do exactly the same with the control data (odd harmonic data from parietal electrodes and even harmonic data from occipital electrodes)
Summary
We can summarise the subgroup comparison plots above by plotting ROC curves for each of our four measurements (Figure 3.5).
## # A tibble: 1 x 5
## eeg threshold occ_even par_odd p
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 56 48 32 22 0.95
If we take \(p\)=0.95 as our cut-off, we can see that the subgroup relations are preserved in 56/63 = 89% and 49/64 = 78% of the comparisons for the primary EEG and display durations repectively. This compares to the 32/64= 50% and 22/64 = 35% for the control EEG conditions.
Additional Analysis
Replicatation of Kohler et al (2016)
We can lok at the groups that only contain orientation, and see if we obtain the parametric response as documented in Kohler et al. (2016). We one might predict based on those results, we get a corresponding pattern of display duration thresholds, with the time taken to detect the symmetry dreasing as we increase the amount of rotational symmetry.
Curiosuly, we do not have a large difference betwee P4 and P6 in the eeg data.
Will try fitting a new parametric model on rotations

Index and Normality
Subgroup relations can be classified by their index, and by whether they are normal or not. Here we investigate the extent to which these two variables can account for the variation between the subgroup relationships.
First of all, we run for the eeg rms data.
And now for the display duration thresholds.
## Family: gaussian
## Links: mu = identity; sigma = identity
## Formula: mean_value ~ index * normal
## Data: comp_summary$threshold (Number of observations: 63)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.60 0.24 -1.07 -0.14 1.00 2121 2374
## index -0.05 0.04 -0.13 0.02 1.00 2022 2204
## normal 0.47 0.30 -0.12 1.05 1.00 1712 2397
## index:normal -0.14 0.08 -0.29 0.02 1.00 2125 2754
##
## Family Specific Parameters:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma 0.44 0.04 0.37 0.53 1.00 2874 2353
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
We can see that the index of the subgroup relationship has an effect on both the difference in log(rms) and the difference in log(display duration): relationships with a higher index lead to larger differences.
Correlation Between Primary EEG data and Psychophysical Thresholds
Finally, we will investigate whether there is a correlation between the our primary EEG measure (rms amplitude of odd harmonics over occipital cortex) and our display duration thresholds. As our two different measures come from different samples of participants, we are unable to do a direct comparison. However, we can use the results of the models discussed in Section 3 and check for a correlation between the predicted values of the two measures.
## Warning: There were 14 transitions after warmup that exceeded the maximum treedepth. Increase max_treedepth above 10. See
## http://mc-stan.org/misc/warnings.html#maximum-treedepth-exceeded
## Warning: Examine the pairs() plot to diagnose sampling problems
## Estimate Est.Error Q2.5 Q97.5
## R2 0.4381404 0.07243615 0.2778867 0.5546333
We can see that although the correlation is relatively weak, our confidence interval indicates that we can be reasonably positive that \(R^2>0\) (i.e, 95% credible interval is 0.28 - 0.55).